package cn.cqie.attendance.common.service;

import cn.cqie.attendance.common.pojo.Attachment;
import cn.cqie.attendance.common.util.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author FallInLove
 * @since 2021-06-16
 */
public interface AttachmentService extends IService<Attachment> {

    Page upload(MultipartFile[] files, Integer type, Integer homeworkId, Integer leaveId, Integer publishHomeworkId);

    Page update(MultipartFile[] files, Integer type, Integer homeworkId, Integer leaveId, Integer publishHomeworkId);

    ResponseEntity<FileSystemResource> download(String path);
}
